/*
 * Se utilizan los metodos de HashTables del JCF
 */
package wordtypecounter;

/**
 *
 * @author Luis José
 */
import java.util.*;
public class HashTables implements WordSet{
    
     Hashtable hashtable;
    static int cont = 0;
    
    public HashTables(){
        hashtable = new Hashtable();
    }
    
    public Word get(Word wordObject){
        Word temp = (Word) hashtable.get(wordObject.getWord());
        return temp;
    }
    
    public void add(Word word){
        if(!(hashtable.containsKey(word.getWord()))) hashtable.put(word.getWord(), word);
    }
}
